Field
The disclosed embodiments relate to techniques for providing power through bus interfaces in computer systems. More specifically, the disclosed embodiments relate to techniques for managing and revoking power allocated through the bus interfaces based on the power requirements of a set of devices connected to the bus interfaces and an extra-current budget associated with the bus interfaces.
Related Art
Computer systems typically include bus interfaces that enable the connection of various peripheral devices to the computer systems and/or use of the peripheral devices by the computer systems. For example, a computer system such as a desktop computer, laptop computer, and/or display may include multiple Universal Serial Bus (USB) interfaces, which may be used to connect the computer system to non-volatile storage devices, optical disk drives, input/output (I/O) devices, network devices, printers, power adapters, portable electronic devices, and even other computer systems.
However, differences in the power requirements and/or preferences of the peripheral devices may result in the inefficient allocation of power to the peripheral devices through the bus interfaces and/or limited use of the peripheral devices. For example, the USB interfaces of a computer system may support both USB 2.0 and USB 3.0 devices, which require up to 500 mA and 900 mA of current to operate, respectively. The computer system may also provide extra current beyond that required by the USB specification to charge batteries and/or perform other high-powered functions in the USB devices without requiring external power supplies for the USB devices. To ensure that all USB devices connected to the computer system receive adequate power to function, the computer system may reserve 900 mA of current for each USB interface, even if one or more of the bus interfaces are used with USB 2.0 devices with lower power requirements. In turn, the computer system may be unable to provide the unused current from empty USB ports and/or the USB 2.0 devices to other USB devices that request additional current, thus limiting the ability of the other USB devices to charge quickly and/or perform the high-powered functions.
Hence, what is needed is a mechanism for efficiently managing and allocating power to devices through bus interfaces in a computer system.